import type { RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
    {
        path: "/404",
        name: "404",
        component: () => import("../views/error/404.vue"),
    },

    {
        path: "/",
        redirect: "/home",
        children: [
            {
                path: "home",
                name: "home",
                component: () => import("../views/home/index.vue"),
                meta: {
                    title: "首页",
                    icon: "ele-HomeFilled",
                },
            },
            {
                path: "source",
                name: "source",
                redirect:'/source/member',
                component: () => import("@/views/course/index.vue"),
                meta: {
                    title: "课程"
                },
                children:[
                    {
                        path:"member",
                        name:"member",
                        component: () => import("@/views/course/member/index.vue"),
                    },
                    //去视频课
                    {
                        path:"videoclass",
                        name:"videoclass",
                        component: () => import("@/views/course/videoclass/index.vue")
                    },
                    //去直播课
                    {
                        path:"liveclass",
                        name:"liveclass",
                        component: () => import("@/views/course/liveclass/index.vue")
                    },
                    //线下课
                    {
                        path:"finishclass",
                        name:"finishclass",
                        component: () => import("@/views/course/finishclass/index.vue")
                    },
                    //主题
                    {
                        path:"theme",
                        name:"theme",
                        component: () => import("@/views/course/theme/index.vue")
                    },
                ]
            },
            {
                path: "practice",
                name: "practice",
                component: () => import("@/views/practice/index.vue"),
                meta: {
                    title: "练习室"
                },
                children:[
                    {
                        path:'studio',
                        name:'Studio',
                        component:()=>import("@/views/practice/studio/practice.vue"),
                        meta:{title:'练习室'}
                    },

                   {
                    path:'huancun',
                    name:'Huancun',
                    component:()=>import('@/views/practice/studio/history.vue'),
                     meta:{title:'缓存'}
                   },
                   {
                    path:'yinpin',
                    name:'Yinpin',
                    component:()=>import('@/views/practice/studio/history.vue'),
                     meta:{title:'音频库'}
                   },
                   {
                    path:'shoucang',
                    name:'Shoucang',
                    component:()=>import('@/views/practice/studio/history.vue'),
                     meta:{title:'收藏'}
                   },
                   {
                    path:'history',
                    name:'History',
                    component:()=>import('@/views/practice/studio/history.vue'),
                     meta:{title:'历史'}
                   }
                ]
            },
            {
                path: "commucation",
                name: "commucation",
                component: () => import("@/views/commucation/index.vue"),
                meta: {
                    title: "交流"
                },
             
            },
            {
                path: "mine",
                name: "mine",
                redirect:'/mine/resource',
                component: () => import("@/views/mine/index.vue"),
                meta: {
                    title: "我的"
                },
                children:[
                    // 资源动态
                    {
                        path:"resource",
                        name:"resource",
                        component: () => import("@/views/mine/resource/index.vue")
                    },

                    // 我的vip
                    {
                        path:"vip",
                        name:"vip",
                        component:() => import ("@/views/mine/vip/index.vue")
                    },
                    
                    // 我的钱包

                    {
                        path: 'wallet',
                        name: 'wallet',
                        component: () => import("@/views/mine/wallet/index.vue"),
                        meta: { title: '我的钱包' }
                    },

                    // 我的优惠券
                    {
                        path: 'coupons',
                        name: 'coupons',
                        component: () => import("@/views/mine/coupons/index.vue"),
                        meta: { title: '我的优惠券' }
                    },

                    // 我的订单
                    {
                        path: 'order',
                        name: 'order',
                        component: () => import("@/views/mine/order/index.vue"),
                    },

                    // 我卖的 订单管理
                    {
                        path:'orders_manager',
                        name:'orders_manager',
                        component: () => import ("@/views/mine/orders_manager/index.vue"),
                    },

                    // 商品管理
                    {
                        path:'goods_manager',
                        name:'goods_manager',
                        component: () => import ("@/views/mine/goods_manager/index.vue"),
                    },

                    // 客户管理
                    {
                        path:'customers_manager',
                        name:'customers_manager',
                        component: () => import ("@/views/mine/customers_manager/index.vue"),
                    },

                    // 待收款
                    {
                        path:'pending_payments_manager',
                        name:'pending_payments_manager',
                        component: () => import ("@/views/mine/pending_payments_manager/index.vue"),
                    },

                    // 优惠管理
                    {
                        path:'minePreferentialManagement',
                        name:'minePreferentialManagement',
                        component: () => import ("@/views/mine/minePreferentialManagement/index.vue"),
                    },

                    // 评价管理
                    {
                        path:'mineReviewsManagement',
                        name:'mineReviewsManagement',
                        component: () => import ("@/views/mine/mineReviewsManagement/index.vue"),
                    },

                       // 保证金
                    {
                        path:'deposit',
                        name:'deposit',
                        component: () => import ("@/views/mine/deposit/index.vue"),
                    },


                    // 我的资料
                    {
                        path:"information",
                        name:"information",
                        component: () => import("@/views/mine/information/index.vue")
                    }

                    //

                ]

            },
        ],
    },
    {
        path: "/:pathMatch(.*)",
        name: "Any",
        redirect: "/404",
        meta: {
            hidden: true,
        },
    }
];
export default routes



